<%@ page language="java" import="java.util.*,java.sql.*,com.ruohi.util.dbutil.*,com.ruohi.util.common.*,com.ruohi.manage.*" pageEncoding="UTF-8"%>
<%
	Connection connection = null;
	DBHelper dbHelper = DBHelper.getInstance();
	Map model = new HashMap();
	Map categorys = new TreeMap();
	String tableName = "gift_customize";
	String channelUUID = CommonString.getFormatPara(request.getParameter("channel_uuid"));
	Map adminInfo = (Map)session.getAttribute("adminInfo");
	try{
		connection = PoolManager.getConnection(DBType.getDBTypeByEnum("106013"));
		String id = CommonString.getFormatPara(request.getParameter("id"));
		if(null!=id&&!"".equals(id)){
			model = dbHelper.getMap(" select * from "+tableName+" where uuid = ? ",new Object [] {id} , connection);
		}
		if("".equals(channelUUID)&&null!=model){
			channelUUID = (String)model.get("channel_uuid");
		}
		
		Map enumMap = (Map)application.getAttribute("enumMap");
		Map yixiangMap = new TreeMap();
		yixiangMap.put("", "请选择定制意向");
		yixiangMap.putAll(CommonApplication.getEnumChildren("179", application));
		Map statusMap = new TreeMap();
		statusMap.put("", "请选择处理状态");
		statusMap.putAll(CommonApplication.getEnumChildren("180", application));
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=Env.getInstance().getProperty("project_name") %></title>
<link rel="stylesheet" type="text/css" href="/plugin/other/highslide/highslide.css" />
<link href="/plugin/ui/ligerUI/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
<link href="/plugin/ui/ligerUI/ligerUI/skins/Gray/css/all.css" rel="stylesheet" type="text/css" />
<link href="/plugin/ui/ligerUI/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
<link href="/backend/style/style.css" rel="stylesheet" type="text/css" />
<script src="/plugin/jquery/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/plugin/area/city/citys.js"></script>
<script type="text/javascript" charset="utf-8" src="/plugin/editor/ueditor/editor_config.js"></script>
<script type="text/javascript" charset="utf-8" src="/plugin/editor/ueditor/editor_all_min.js"></script>
<link rel="stylesheet" type="text/css" href="/plugin/editor/ueditor/themes/default/ueditor.css"/>
</head>

<body style="margin: 0;padding: 0;">
<form name="theform" id="theform" action="/backend/action/crud.jsp?enumNo=106013">
  <div class="formDiv">
    <div class="group"> <span><img src="/plugin/ui/ligerUI/ligerUI/skins/icons/communication.gif" /></span> <span class="groupTitle">商品定制申请信息</span> </div>
    <div class="formLeft">申请时间</div>
    <div class="formRight" style="width:190px; text-align:left;">
      <label><%=CommonDate.getFormatDate("yyyy-MM-dd HH:mm", model.get("add_date")) %></label>
    </div>
    <div style="clear:left;"></div>
    <div class="formLeft">定制意向</div>
    <div class="formRight" style="width:190px; text-align:left;">
      <label><%=CommonString.getFormatPara(enumMap.get(model.get("custom_purpose"))) %></label>
    </div>
    <div style="clear:left;"></div>
    <div class="formLeft">期望制作周期</div>
    <div class="formRight" style="width:190px; text-align:left;">
      <label><%=CommonString.getFormatPara(model.get("custom_cycle")) %></label>
    </div>
    <div style="clear:left;"></div>
    <div class="formLeft">联系人</div>
    <div class="formRight" style="width:190px; text-align:left;">
      <%=CommonString.getFormatPara(model.get("link_man")) %>
    </div>
    <div style="clear:left;"></div>
    <div class="formLeft">联系电话</div>
    <div class="formRight" style="width:190px; text-align:left;">
    	<%=CommonString.getFormatPara(model.get("link_phone")) %>
	</div>
	<div style="clear:left;"></div>
	<div class="formLeft">邮箱</div>
    <div class="formRight" style="width:190px; text-align:left;">
    	<%=CommonString.getFormatPara(model.get("link_email")) %>
	</div>
	<div style="clear:left;"></div>
	  <div class="group"> <span><img src="/plugin/ui/ligerUI/ligerUI/skins/icons/communication.gif" /></span> <span class="groupTitle">处理信息</span> </div>
	  <div class="formLeft"><span style="color:#F00">* </span>处理状态</div>
	  <div class="formRight" style="width:200px">
	    	<select id="zd_status" name="zd_status" class="jr_select" dataType="Require" msg="请选择处理状态">
	    		<%=CommonForm.createSelect(statusMap, CommonString.getFormatPara(model.get("status"))) %>
	    	</select>
	  </div>
	  <div style="clear:left;"></div>
	  <div class="formLeft">备注</div>
	  <div class="formRight" style="text-align:left;">
	    	<textarea style="width:400px; height:100px;" id="zd_remark" name="zd_remark" maxlength="500"><%=CommonString.getFormatPara(model.get("remark")) %></textarea>
	  </div>
  </div>
  <input type="hidden" name="tableName" id="tableName" value="<%=tableName %>" />
  <input type="hidden" name="zd_id" id="zd_id" value="<%=CommonString.getFormatPara(model.get("id")) %>" />
</form>
</body>
</html>
<script type="text/javascript" src="/plugin/jquery/jquery.form.js"></script>
<script src="/plugin/ui/ligerUI/ligerUI/js/ligerui.min.js" type="text/javascript"></script>
<script src="/backend/scripts/common.js?tab" type="text/javascript"></script>
<script src="/plugin/validator/wofoshan/validator.min.js" type="text/javascript"></script>
<script type="text/javascript">
	function doSub(){
		var rs = Validator.Validate(document.getElementById("theform"),1);
		if(rs){
			jQuery("#theform").ajaxSubmit({
				type : "POST",
				async : false ,
				success : function(data) {
					var rs = parseInt(jQuery.trim(data), 10);
					if (rs > 0) {
						jrSuccess("保存成功！");
						<%
						if("".equals(id)){
							%>
						window.location.reload();
							<%
						}
						%>
					}
				}
			});
		}
	}
</script>
<%
	}catch(Exception e){
		e.printStackTrace();
	}finally{
		dbHelper.freeConnection(connection);
	}
%>